package com.exceeddata.vcloud.common.kafka;

import org.springframework.kafka.support.SendResult;
import org.springframework.util.concurrent.ListenableFutureCallback;

/**
 * @author: yxh
 * @Description: Kafka异步发送回调
 * @Date: Created in 2025/2/28 14:30
 * @Modified By:
 */
public interface KafkaCallback<K, V> extends ListenableFutureCallback<SendResult<K, V>> {


    @Override
    default void onSuccess(SendResult<K, V> result) {
        //回调处理
    }

    @Override
    default void onFailure(Throwable ex) {
        //处理
    }

}
